﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Windows;
using System.IO;
using Microsoft.Samples.Channels.ChunkingChannel;

namespace CrazyClient
{
    [MessageContract()]
    public class AssetSendSongData
    {
        [MessageHeader(MustUnderstand = true)]
        public string fileName;
        [MessageHeader(MustUnderstand = true)]
        public DateTime lastUpdate;
        [MessageBodyMember(Order = 1)]
        public Stream data;
    }

    [ServiceContract(Namespace = "http://Microsoft.ServiceModel.Samples")]

    public interface IBaseListener
    {
        [OperationContract]
        bool TryConnect();
        [OperationContract]
        DisplayInfoList GetDisplayInfo();
        [OperationContract]
        Dictionary<Guid, Display> GetCurrentDisplays();
        [OperationContract]
        Display AddDisplay(string deviceName, Point position, Size size);
        [OperationContract]
        void ModifyDisplay(Guid key, Point position, Size size, bool isFullScreen);
        [OperationContract]
        void RemoveDisplay(Display display);
        [OperationContract]
        void ResetDisplay(Display display);
        [OperationContract]
        Display AddFullScreenDisplay(string deviceName);
        [OperationContract]
        void SendMidiMessage(MidiMessage m);

        [OperationContract]
        bool AssetsNeedsUpdate(string filename, DateTime lastUpdate);

        [OperationContract]
        [ChunkingBehavior(ChunkingAppliesTo.InMessage)]
        void AssetUpdate(AssetSendSongData assetSongSendData);//



        [OperationContract]
        void SongLoad(string fileName);
        [OperationContract]
        void SongUnload();
        [OperationContract]
        void SongOverride(bool activate);
        [OperationContract]
        void SendData(string name, int value);

        [OperationContract]
        void SendDataString(string name, string value);


    }

}



